package com.ncmmall.domain.business.bankcard;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ncmmall.domain.security.user.WebUser;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import java.sql.Timestamp;

/**
 * 银行卡
 *
 * @author likaikai
 * @date 2019-07-15 15:46
 */
@Entity
@Table(name = "mall_bank_card")
@Access(AccessType.FIELD)
public class BankCard {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    /**
     * 会员
     */
    @OneToOne
    @JsonIgnore
    private WebUser member;

    /**
     * 开户名
     */
    private String accountName;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 银行名称
     */
    private String bankName;

    /**
     * 银行卡号
     */
    private String bankCardNo;

    /**
     * 银行省
     */
    private String bankProvince;

    /**
     * 银行市
     */
    private String bankCity;

    /**
     * 银行支行
     */
    private String bankSubBranch;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Timestamp createTime;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public WebUser getMember() {
        return member;
    }

    public void setMember(WebUser member) {
        this.member = member;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCardNo() {
        return bankCardNo;
    }

    public void setBankCardNo(String bankCardNo) {
        this.bankCardNo = bankCardNo;
    }

    public String getBankProvince() {
        return bankProvince;
    }

    public void setBankProvince(String bankProvince) {
        this.bankProvince = bankProvince;
    }

    public String getBankCity() {
        return bankCity;
    }

    public void setBankCity(String bankCity) {
        this.bankCity = bankCity;
    }

    public String getBankSubBranch() {
        return bankSubBranch;
    }

    public void setBankSubBranch(String bankSubBranch) {
        this.bankSubBranch = bankSubBranch;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
